local PROPERTY_NAME = 'WorkerCount';
function NatsumiCityWorkerChanged (playerId, cityId, x, y)
	local city = CityManager.GetCity(playerId, cityId);
	for _, district in city:GetDistricts():Members() do
		local x = district:GetX();
		local y = district:GetY();
		local plot = Map.GetPlot(x, y);
		ExposedMembers.GameEvents.NatsumiSetPlotProperty.Call(x, y, PROPERTY_NAME, plot:GetWorkerCount());
	end
end
Events.CityWorkerChanged.Add(NatsumiCityWorkerChanged);

function HD_Natsumi_WitchImprove (playerId, unitId)
	local unit = UnitManager.GetUnit(playerId, unitId);
	local location = unit:GetLocation();
	local city = CityManager.GetCityAt(location.x, location.y);
	if (city ~= nil) and (city:GetOwner() == unit:GetOwner()) then
		for _, index in ipairs(Map.GetCityPlots():GetPurchasedPlots(city)) do
			ExposedMembers.GameEvents.HD_Natsumi_WitchImproveSwitch.Call(playerId, index);
		end
	end
end
ExposedMembers.GameEvents.HD_Natsumi_WitchImprove.Add(HD_Natsumi_WitchImprove);